#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <assert.h>

void* my_memcpy(void* dest,void* src,size_t num)
{
	void* ret = dest;
	assert(dest);
	assert(src);
	while (num--)
	{
		*(char*) dest =*(char*)src;
		dest = (char*)dest + 1;
		src = (char*)src + 1;
	}
	return ret;
}
int main()
{
	int arr1 [10]= { 1,2,3,4,5,6 };
	int arr2 [10]= {0};
	my_memcpy(arr2, arr1, 20);
	int i = 0;
	for (i = 0; i < 10; i++)
	{
		printf("%d ", arr2[i]);
	}
	return 0;
}